package com.fit.pages.vehicle;

import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.annotations.AdminAccess;
import com.fit.annotations.UserAccess;
import com.fit.dao.vehicle.VehicleDAO;
import com.fit.entities.Vehicle;
import com.fit.pages.Confirmation;

@UserAccess
@AdminAccess
public class Details {

	@Property
	@Persist
	private Vehicle vehicle;
	
	@Inject
	private VehicleDAO vehicleDAO;

	Object onActivate(String chassisNumber) {
		vehicle = vehicleDAO.findByChassisNumber(chassisNumber);
		return null;

	}

}
